<?php

/**
 * BbLeague form.
 *
 * @package    vogue
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class BbLeagueForm extends BaseBbLeagueForm
{
  public function configure()
  {
    
	   	# WIDGETS
      $this->widgetSchema['name']       = new sfWidgetFormInputText(array(), array('style'=>'width:400px;'));            
      $this->widgetSchema['logo']       = new sfWidgetFormInputFile(array(), array());
      $this->widgetSchema['descr']       = new sfWidgetFormTextarea(array(), array('style'=>'width:400px;height:100px;'));
      $this->widgetSchema['published']       = new sfWidgetFormInputCheckbox(array(), array('value'=>1));
      
	  # VALIDATORS			
      $this->validatorSchema['logo']       = new sfValidatorFile(
                                                  array('required' => false,
                                                      'path'       => sfConfig::get("sf_upload_dir")."/league",
                                                      'max_size'   => 209715200,
                                                      'mime_types' =>  array('image/jpeg','image/pjpeg','image/png','image/x-png','image/gif',)),
                                                  array(
                                                      'max_size'   => 'Файлын хэмжээ хамгийн ихдээ 20MB байна',
                                                      'mime_types' => 'Дараах өргөтгөлтэй файлууд зөвшөөрөгдөнө: jpg, png, gif'));
	 // LABELS      
      $this->widgetSchema->setLabel('name', 'Нэр');
      $this->widgetSchema->setLabel('descr', 'Тухай');      
      $this->widgetSchema->setLabel('logo', 'Лого');
      $this->widgetSchema->setLabel('published', 'published');    
  }
}
